<template>
  <view>
    <view class="container">
      <view class="main" style="    padding: 1rem" v-html="pageinfo.editor">
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      pageinfo: {
        title: ""
      },
      params:{
        id:0
      }
    }
  },
  onLoad(options) {
    this.params = options;
    this.getPageinfo()
  },
  created(options) {
    console.log(options)
  },
  methods: {
    getPageinfo(){
      const that=this
      console.log(this.params)
      this.$api.getPageinfo(this.params).then(res=>{
        let result=res.data;
        that.pageinfo=result;
        uni.setNavigationBarTitle({
          title:result.title
        })
      })
    }
  }
}
</script>

<style>

</style>